import axios from '../request'

export const findByPageApi = (page) => axios.get("/api/v2/pub/credit_card_batch/findBatchByPage", {
    params: {
        "page": page
    }

})
export const findByNameApi = (name, page) => axios.get("/api/v2/pub/credit_card_batch/findByName", {
    params: {
        "page": page,
        "name": name
    }

})

export const deleteByIdApi = (id) => axios.get("/api/v2/pub/credit_card_batch/deleteById", {
    params: {
        "id": id
    }

})


export const updateAPi = (id, name) => axios.post("/api/v2/pub/credit_card_batch/update", {
    "id": id,
    "name": name
})


export const exportExcel = (name, key) => axios.post("/api/v2/pub/credit_card_batch/exportExcel", {
    "name": name,
    "key": key
}, {
    responseType: 'blob'

})

export const exportWord = (name, key) => axios.post("/api/v2/pub/credit_card_batch/exportWord", {
    "name": name,
    "key": key
}, {
    responseType: 'blob'
})

export const exportZip = (name, key) => axios.post("/api/v2/pub/credit_card_batch/exportZip", {
    "name": name,
    "key": key
}, {
    responseType: 'blob'
})

export const exportWord_1 = (name, key) => axios.post("/api/v2/pub/credit_card_batch/exportWord_1", {
    "name": name,
    "key": key
}, {
    responseType: 'blob'
})

export const exportZip_1 = (name, key) => axios.post("/api/v2/pub/credit_card_batch/exportZip_1", {
    "name": name,
    "key": key
}, {
    responseType: 'blob'
})